#include <iostream>
#include "golf.h"
#include <cstring>

int main(void)
{
	/*golf ann;
	setgolf(ann, "Ann Birdfree", 24);
	golf andy;

	std::cout << setgolf(ann) << "\n";
	showgolf(ann);
	std::cout << setgolf(andy) << "\n";
	showgolf(andy);
	setgolf(andy, "Andy Lionson", 10);
	std::cout << setgolf(andy) << "\n";
	showgolf(andy);
	handicap(andy,26);
	showgolf(andy);
	*/
	using namespace std; 

	char name[Len];
	int  handicap1;
	golf g[3] = {{"",0},{"",0},{"",0}};
	// cout << "Enter some names and handicaps: ";
	// cin.getline(name, Len); 
	// cin >> handicap1;
	int cnt = 0;
	//while (strlen(name) > 0)
	while(cnt < 3)
	{
		cout << "Enter some names and handicaps: ";
		cin.getline(name, Len); 
		if (strlen(name) == 0)
			break;
		cin >> handicap1;
		cin.get();
		setgolf(g[cnt], name, handicap1);
		++cnt;
	}
	showgolf(g[0]);
	showgolf(g[1]);
	showgolf(g[2]);
	cout << "Bye!\n";
	return 0;
}
